package com.zhangzhan.gulimallcommcon.exception.exception_enum;

/**
 * @author 张一恒
 * @version 1.0
 * @description: 异常枚举
 * @date 2024/6/15 20:07
 */
public enum ExceptionEnum {

    UNNOW_EXCEPTION(10000, "系统未知异常"),
    VALID_EXCEPTION(10001, "字段校验异常"),
    VALID_SMS_TIME_EXCEPTION(10002, "验证码获取失败，请稍后再次获取"),
    VALID_REG_USER_EXCEPTION(10003, "已存在%s，用户注册失败"),
    VALID_LOGIN_USER_EXCEPTION(10004, "登录失败，账号或密码错误"),
    VALID_OAUTH2_USER_EXCEPTION(10005, "注册失败，网络错误"),
    VALID_WARE_SKU_EXCEPTION(10006, "库存不足异常"),
    PRODUCT_SAVE_EXCEPTION(11000, "商品保存es失败");


    private Integer code;
    private String meg;

    ExceptionEnum(Integer code, String meg) {
        this.code = code;
        this.meg = meg;
    }

    public Integer getCode() {
        return code;
    }


    public String getMeg() {
        return meg;
    }

}
